home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / UIFlow 1.0.1 / UIFlow Source / VSet2.0 / temp / eghi.f < prev    next >
Encoding:
Text File  |  1991-12-12  |  1.2 KB  |  69 lines  |  [TEXT/????]

  1. c  ==================================================================    
  2. c
  3. c    EGHI.F
  4. c    HDF VSET Sample Program
  5. c
  6. c    Uses High-Level routines
  7. c    Creates a vset of 1 vgroup and 2 vdatas into the file 'eghi.hdf'.
  8. c
  9. c    Jason NG NCSA 12-MAY-91
  10. c    
  11. c    ==================================================================
  12.  
  13.     program SAMPLE
  14.  
  15.     integer    buf(100), i, n
  16.     integer f
  17.  
  18.     external DFOPEN, DFCLOSE
  19.     external VHFSD, VHFSDM, VHMKGP
  20.  
  21.     integer    DFOPEN
  22.     integer    VHFSD, VHFSDM, VHMKGP
  23.  
  24.     integer  vs, vg
  25.  
  26. c    some defined constants. see "vg.h"
  27.  
  28.     integer INTTYPE                
  29.     parameter (INTTYPE=2)
  30.     integer    FINTRLACE
  31.     parameter (FINTRLACE=0)
  32.  
  33.     integer FULLACC    
  34.     parameter (FULLACC=7)
  35.  
  36. c    ------ generate data -------
  37.     do 111 i=1,100
  38.         buf(i) = i+500
  39. 111    continue
  40.  
  41.  
  42. c    ------ write to vset -------
  43.  
  44.     f = DFOPEN ('eghi.hdf', FULLACC, 0)
  45.  
  46. c    --- (B) ----
  47.     vs = VSFATCH (f, -1,'w')
  48.     call VSFSNAM(vs, 'the_fortune_500_vdata')
  49.     n = VSFSFLD (vs, 'IY')
  50.     n = VSFWRIT (vs, buf,20, FINTRLACE)
  51.     n = VFINSRT (vg, vs)
  52.     call VSFDTCH (vs)
  53.  
  54. c    --- (C) ---
  55.     vs = VSFATCH (f, -1,'w')
  56.     call VSFSNAM(vs, 'the-famous-sevens')
  57.     n = VSFFDEF (vs, 'SIEBEN',INTTYPE,1)
  58.     n = VSFSFLD (vs, 'SIEBEN')
  59.     n = VSFWRIT (vs, sbuf,70, FINTRLACE)
  60.     n = VFINSRT (vg, vs)
  61.     call VSFDTCH (vs)
  62.  
  63. c    --- (D) ---
  64.     call VFDTCH (vg)
  65.     call DFCLOSE (f)
  66.  
  67.     end
  68.  
  69.